// pages/product/component/coupon.js
let app = getApp();
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    addressInfo:{
      type: Array
    }
  },

  /**
   * 组件的初始数据
   */
  data: {
    
  },
  attached() {
   
  },
  lifetimes: {
    attached: function() {
      
    },
    detached: function() {
      // 在组件实例被从页面节点树移除时执行
      
    },
  },
  /**
   * 组件的方法列表
   */
  methods: {
    cancleAddress() {
      this.triggerEvent('cancleAddress')
    },
    addressChoose(data) {
      this.triggerEvent('addressChoose', data.currentTarget.dataset.item)
    },
    addressClick() {
      if (app.globalData.token != null){
        wx.navigateTo({
          url: '/pages/member/address/address?type=product',
        })
      }else{
        wx.navigateTo({
          url: '/pages/login/index',
        })
      }
    }
  }
})